$("#data_form").show();
$("#serial_billing_country").change(function(){
	var v=$("#serial_billing_country").val();
	if(v=='PH')
	{	
		$("#serial_billing_region").val(0);
			$("#serial_billing_state").val('N/A');
			$("#regionholder").show();
			$("#stateholder").hide();
		
	}
	else
	{
			$("#serial_billing_region").val('N/A');
				$("#serial_billing_state").val('');
		$("#regionholder").hide();
	
		$("#stateholder").show();
		
	}

	
});


	$("#askcopy").click(function(){
		var m = $("#askcopy").val();
		if($('#askcopy').attr('checked'))
		{
				$("#serial_billing_city").val($("#serial_user_city").val());
				$("#serial_billing_zip").val($("#serial_user_zip").val());
		}
		else
		{
				$("#serial_billing_city").val('');
				$("#serial_billing_zip").val('');
		}
	

		
	});
	jQuery.validator.addMethod("noNCR", function(value, element) {
	    return this.optional(element) || (value != 'NCR');
	}, "Content not Viewable for users from NCR");
	jQuery.validator.addMethod("noZero", function(value, element) {
	    return this.optional(element) || (value != 0);
	}, "This field is Required");
	
	$("#data_form").validate({
			rules: {
				serial_billing_name: "required",
				serial_billing_country: "required",
				serial_billing_zip: "required",
				serial_billing_address: "required",
				serial_billing_city: "required",
				serial_billing_state: "required",
				serial_country: {
					required: true,
					noZero : true
				},
				
				serial_user_region: {
					required: true,
					noNCR : true,
					noZero : true
				}
			}
				
		});



